<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ include file="../../attr.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!doctype html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=emulateIE7"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="${ctx}/css/sapar.css"/>
<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css"/>
<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/js/sapar.js"></script>
<script type="text/javascript" src="${ctx}/js/WdatePicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/layer/layer.js"></script>
<title>回收管理</title>
</head>

<body>
<div id="saper-container">
    <div id="saper-hd"></div>
    <div id="saper-bd">
        <div class="subfiled clearfix">
            <h2>清洗消毒</h2>
        </div>
        <div class="subfiled-content">
            <div class="search-box clearfix">
                <div class="kv-item clearfix">
                    <label>网篮条码：</label>
                    <div class="kv-item-content">
                        <input type="text" id="searchTxt" name="searchTxt" placeholder="清洗网篮条码" class="search_text">
                    </div>
                </div>
            </div>


            <!--表格开始-->
            <div class="table">
                <!--表格操作-->
                <div class="table-operate ue-clear">
                    <a href="javascript:;" class="add">添加</a>
                    <a href="javascript:;" class="edit">修改</a>
                    <a href="javascript:;" class="del">删除</a>
                </div>
                <!--表格具体内容-->
                <div class="table-box">
                    <table>
                        <thead>
                        <tr>

                            <th>网篮条码</th>

                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>
                <div class="kv-item clearfix">
                    <div class="kv-item-content">
                        <a href="javascript:;" class="sapar-btn sapar-btn-recom query-btn" id="save">保存</a>
                    </div>
                </div>
            </div><!--表格结束-->
        </div>
    </div>
    <div id="saper-ft">

    </div>
</div>

</body>

<script type="text/javascript">
    var isover = 0;
    var peibao = new Object();
    var lanArray = new Array();
    String.prototype.startWith = function (compareStr) {
        return this.indexOf(compareStr) == 0;
    }
    document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode == 27) { // 按 Esc
            //要做的事情
        }
        if (e && e.keyCode == 113) { // 按 F2
            //要做的事情
        }
        if (e && e.keyCode == 13) { // enter 键
            //要做的事情
            peibao.lan = $("#searchTxt").val();
            console.log(peibao);
// 			if(text1.startWith('RZS')){
// 				peibao.bao = text1;
// 			}else{
// 				peibao.lan = text1;
// 			}
            if (peibao.lan != null) {
                var str = "<tr><td>" + peibao.lan + "</td></tr>";
                $(".table-box tbody").append(str);
                lanArray.push(peibao);
                // 清空配包的属性
                peibao = new Object();


            }
            $("#searchTxt").val('');
        }
    };
    window.onload = function () {
        $("#searchTxt").focus();
    }
    $(function () {
        $(".query-btn").click(function () {
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            console.log(lanArray);
            parent.callbackWlData(lanArray);
            parent.layer.close(index);

        })

    })
</script>
</html>